package org.n.shop.controller;

import lombok.AllArgsConstructor;
import org.n.shop.result.RestResult;
import org.n.shop.service.TypeService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@AllArgsConstructor
@RequestMapping("/type")
public class TypeController {
    private TypeService typeService;

    @RequestMapping("/all")
    public RestResult all(@RequestParam int page, int pageSize) {
        return typeService.all(page, pageSize);
    }
}
